package com.atguigu.springboot02advanced.controller;

import com.atguigu.springboot02advanced.entity.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@RequestMapping(value = "/superQuan")
public class SuperController {

    @Autowired
    private Person person;

    //RequestMapping  请求映射
    @RequestMapping(value = "/getUserInfo")
    public Person getUserInfo(){
        return person;
    }

    /**
     * 若静态资源也有beautiful.jpg，则会先走controller，controller没有再找有无对应静态资源，都无则报404
     * @return
     */
    @RequestMapping(value = "/beautiful.jpg")
    public String sayHello(){
        return "hello";
    }
}
